<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%--
  Created by IntelliJ IDEA.
  User: 谷金山
  Date: 2019/7/3
  Time: 14:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java"  %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <%@include file="/include.jsp" %>
    <script type="text/javascript" src="<%=basePath %>js/My97DatePicker/WdatePicker.js"></script>
    <style>
        body{font-family:"微软雅黑";padding-top:10px;margin:0px;}

    </style>
    <script type="text/javascript">
        //查询
        function searchFn(pageNow){
            $("#form1").attr("action","<%=basePath %>dantichaxun?pageNow="+pageNow).submit();
        }


    </script>
    <script >
$(function() {
    $("input[type=radio]").change(function () {
           //alert($(this).val());

      window.location="dantichaxun?radio="+$(this).val();

    })
    var s="${radio}";
    $("input[type='radio'][name='radio'][value='"+s+"']").attr("checked",true);
});



    </script>
</head>
<body>
<div id="div1">
    <!--tab-->
<form id="form1" action="dantichaxun" method="post"  accept-charset="UTF-8">
    <ul    class="nav nav-pills nav-justified" style="border-bottom:solid 3px rgb(66, 139, 202);">
<div style="background-color: #66F4DF">
        <li  class="active" role="presentation"   style="color: #2e6da4; width:100px;float: left">  采购单状态：     </li>
</div>

        <div>
        <li class="active"role="presentation"style="width:100px;float: left">
            <input type="radio" name="radio" id="1" value="1"checked="checked">全部</input>
            </li>
        <li class="active"role="presentation"style="width:100px;float: left">
            <input type="radio" name="radio" id="2" value="2">已下达</checkbox>
        </li>
        <li class="active"role="presentation"style="width:100px;float: left">
            <input type="radio" name="radio" id="3" value="3">已提交</input>
        </li>
        <li class="active"role="presentation"style="width:100px;float: left">
            <input type="radio" name="radio" id="4" value="4">已发布</checkbox>
        </li>
        <li class="active"role="presentation"style="width:100px;float: left">
            <input type="radio" name="radio" id="5" value="5">已作废</input>
        </li>
        <li class="active"role="presentation"style="width:100px;float: left">
            <input type="radio" name="radio" id="6" value="6">已驳回</input>
        </li>
        </div>


    </ul>
<table>
    <tr style="height: 56px">
        <div style="background-color: #A7E2E7">
        <td>采购单号:  </td><td><input type="text" name="name"></td><td style="width: 100px"> </td><td><input type="submit" style="background-color: #3C81C2" value="查询"></td>
       </div>
    </tr>
</table>

    <input type="hidden" value="<%=basePath %>" id="path">

    <!--datagrid-->
    <div class="table-responsive" style="overflow-y:hidden">
        <table class="table table-striped" >
        <tbody>
        <tr>
            <th>序号</th><th>单据编号</th> <th>煤种</th> <th>采购数量（万吨）</th><th>收到基低位发热量</th><th>运输方式</th> <th>下达日期</th> <th>订单状态</th> <th>操作</th>
        </tr>
        <c:forEach items="${list}" var="e" >
            <tr>
                <c:if test="${e.executestate=='已下达'}">
                <td>${e.purchapplyid}</td><td>${e. billnumber}</td><td>${e.coaltype}</td>  <td>${e.qty}</td><td>${e.type1}</td><td>${e.yunshuMode}</td><td>${e.writedate}</td><td>${e.executestate}</td> <td><a href="<%=basePath%>update?id=${e.purchapplyid}">填报</a> </td>
                </c:if>
                <c:if test="${e.executestate=='已驳回'}">
                    <td>${e.purchapplyid}</td><td>${e. billnumber}</td><td>${e.coaltype}</td>  <td>${e.qty}</td><td>${e.type1}</td><td>${e.yunshuMode}</td><td>${e.writedate}</td><td>${e.executestate}</td> <td><a href="<%=basePath%>update?id=${e.purchapplyid}">填报</a></td>
                </c:if>
                <c:if test="${e.executestate=='已发布'}">
                    <td>${e.purchapplyid}</td><td>${e. billnumber}</td><td>${e.coaltype}</td>  <td>${e.qty}</td><td>${e.type1}</td><td>${e.yunshuMode}</td><td>${e.writedate}</td><td>${e.executestate}</td> <td><a href="<%=basePath%>detailTFultbpurchasingapply?id=${e.purchapplyid}">查看</a></td>
                </c:if>
                <c:if test="${e.executestate=='已提交'}">
                    <td>${e.purchapplyid}</td><td>${e. billnumber}</td><td>${e.coaltype}</td>  <td>${e.qty}</td><td>${e.type1}</td><td>${e.yunshuMode}</td><td>${e.writedate}</td><td>${e.executestate}</td> <td><a href="<%=basePath%>detailTFultbpurchasingapply?id=${e.purchapplyid}">查看</a></td>
                </c:if>
                <c:if test="${e.executestate=='已作废'}">
                    <td>${e.purchapplyid}</td><td>${e. billnumber}</td><td>${e.coaltype}</td>  <td>${e.qty}</td><td>${e.type1}</td><td>${e.yunshuMode}</td><td>${e.writedate}</td><td>${e.executestate}</td> <td><a href="<%=basePath%>detailTFultbpurchasingapply?id=${e.purchapplyid}">查看</a></td>
                </c:if>
            </tr>
        </c:forEach>
        </tbody>
    </table>
    </div>
    <!--分页-->
        <nav  >
    <ul class="pagination"  >
        <li class="" ><a  href="javascript:void(0)" onmouseout="pageOut(this)" onmouseover="pageOver(this)" onclick="searchFn('1')" >首页 <span class="sr-only"></span></a></li>
        <li class=""><a href="javascript:void(0)"  onmouseout="pageOut(this)" onmouseover="pageOver(this)" onclick="searchFn('${page.pageNow-1}')" ><span aria-hidden="true">上一页&laquo;</span></a></li>
        <li class=""><a href="javascript:void(0)" onmouseout="pageOut(this)" onmouseover="pageOver(this)"  onclick="searchFn('${page.pageNow+1}')" ><span aria-hidden="true">下一页&raquo;</span></a></li>
        <li class=""><a href="javascript:void(0)" onmouseout="pageOut(this)" onmouseover="pageOver(this)"  onclick="searchFn('${page.totalPage}')">尾页 <span class="sr-only" ></span></a></li>
        <li class=""><a href="javascript:void(0)" >当前第${page.pageNow}页
          总页数：${page.totalPage}页  &nbsp;&nbsp;总记录数：${page.total}</a></li>

    </ul>
        </nav>

</form>
</div>
</div>

</div>




</body>
</html>
